#!/usr/bin/python

ab = {  
    'zhangsan'  : 'zhangsan@abc',
    'lisi'      : 'lisi@abc',
    'wanger'    : 'wanger@abc',
    'mazi'      : 'mazi@abc'
    }

print 'zhangsan email is %s' % ab['zhangsan']
ab['xiaofeng'] = 'xiaofeng@abc'

del ab['mazi']

print '\nThere are %d contacts in the email-book \n' % len(ab)

for name , email in ab.items():
    print 'contatc %s at %s' % (name, email)

if 'xiaofeng' in ab:
    print "\nxiaofeng's email is %s" %ab['xiaofeng']

if ab.has_key('xiaofeng'):
    print "\nxiaofeng's email is %s" %ab['xiaofeng']

print ab.keys()

